package com.sgl.myview.business.qqcehua;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.MotionEvent;
import android.view.View;
import android.widget.ListView;

import com.sgl.myview.R;
import com.sgl.myview.view.QQCeHuaLayout;

import butterknife.ButterKnife;
import butterknife.InjectView;
import butterknife.OnClick;

public class VDHLayoutActivity extends AppCompatActivity {

    @InjectView(R.id.cehua)
    QQCeHuaLayout mQQCeHua;
    @InjectView(R.id.list_view)
    ListView mListView;

    private QQCeHuaAdapter mAdapter;

    public static Intent getInstance(Context mContext) {
        return new Intent(mContext, VDHLayoutActivity.class);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //setContentView(R.layout.activity_vdhlayout);
        setContentView(R.layout.activity_qq_cehua);
        ButterKnife.inject(this);
        mAdapter = new QQCeHuaAdapter(this);
        mListView.setAdapter(mAdapter);
        mListView.setOnTouchListener(new View.OnTouchListener() {
            @Override
            public boolean onTouch(View v, MotionEvent event) {
                return false;
            }
        });
    }

    @OnClick(R.id.button)
    public void onClick() {
        mQQCeHua.toOriginal();
    }
}
